import Vue from "vue";
import VueRouter from 'vue-router'

//安装插件
Vue.use(VueRouter)
//创建对象
const routes=[
  {
    path: "",
    redirect: '/home'
  },
  {
    path: '/home',
    component: ()=>import('../views/home/Home')
  },
  {
    path: '/Category',
    component: ()=>import('../views/category/Category')
  },
  {
    path: '/cart',
    component:()=>import('../views/cart/Cart')
  },
  {
    path: '/profile',
    component: ()=>import('../views/me/Me')
  },
  {
    path:'/detail/:iid',
    component:()=>import("../views/detail/Detail")
  }
]
const router=new VueRouter({
   routes,
  mode:'history'

})
export default  router;
